<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>
<html>
<style type="text/css">
<%@include file ="../../css/style.css"%>
<%@include file ="../../css/table.css"%>
<%@include file ="../../css/button.css"%>
</style>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login</title>
</head>
<body>
	<div id="wrapper">
		<div id="header">
			<div id="logo">
				<h1>
					<a>Market Control</a>
				</h1>
			</div>
			<div id="slogan">
				<h2>Financial Portal</h2>
			</div>
		</div>
		<div id="menu">
			<ul class="menu">
				<li class="home"><a href="home" title="Home">Home</a></li>
				<li class="services"><a href="equityquery">Equity</a></li>
				<security:authorize ifAllGranted="ROLE_ADMIN">
					<li class="services"><a href="admin">Admin</a></li>
				</security:authorize>
				<li class="about"><a href="#" title="About">About</a></li>
				<li class="services"><a href="#" title="Services">Services</a></li>
				<li class="contacts"><a href="#" title="Contacts">Contacts</a></li>
				<security:authorize ifNotGranted="ROLE_ADMIN,ROLE_USER">
				<li class="login"><a href="<c:url value="/login.jsp" />"
					title="Login">Sign in</a></li>
				</security:authorize>	
				<security:authorize ifAnyGranted="ROLE_ADMIN,ROLE_USER">
					<li class="logout"><a
						href="<c:url value="/j_spring_security_logout" />" title="Logout">Logout</a></li>
				</security:authorize>
				<security:authorize ifNotGranted="ROLE_ADMIN,ROLE_USER">
					<li class="register"><a href="register" title="Register">Register</a></li>
				</security:authorize>
			</ul>
			<br class="clearfix" />
		</div>
		<div id="page">
			<div id="content">
				<div class="box">
					<c:if test="${not empty param.error}">
						<font color="red"> Login error. <br /> Reason :
							${sessionScope["SPRING_SECURITY_LAST_EXCEPTION"].message}
						</font>
					</c:if>
					<h5>Please enter login credentials</h5>
					<form method="POST"
						action="<c:url value="/j_spring_security_check" />">
						<table>
							<tr>
								<td align="right">Username</td>
								<td><input type="text" name="j_username" /></td>
							</tr>
							<tr>
								<td align="right">Password</td>
								<td><input type="password" name="j_password" /></td>
							</tr>
							<tr>
								<td align="right">Remember me</td>
								<td><input type="checkbox"
									name="_spring_security_remember_me" /></td>
							</tr>
							<tr>
								<td colspan="2" align="right"><input type="submit"
									value="Login" /> <input type="reset" value="Reset" /></td>
							</tr>
						</table>
					</form>
				</div>
			</div>
			<br class="clearfix" />
		</div>
		<br class="clearfix" />
	</div>
	<div id="footer">
		<a> Copyright (c) 2012 Marketcontrol.com. All rights reserved.</a>.
	</div>
</body>
</html>